<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Tag_model extends MY_Model
{
	public $_table = 'tags';

	public function __construct()
	{
		parent::__construct();
	}

	public function auto_complete($chars)
	{
		if($chars)
		{
			return $this->db->select('id, title as value')
				->like('title', $chars)
				->get($this->_table)
				->result_array();
		}
	}
}